home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / 534.swf / scripts / frame_69 / DoAction.as
Text File  |  2006-01-17  |  683b  |  32 lines

  1. function d_coin()
  2. {
  3.    if(credit >= _root.coinValue && bet < max)
  4.    {
  5.       d = 1;
  6.       while(d < 154)
  7.       {
  8.          if(_root.chace.hitTest(_root["coin_t" + d]))
  9.          {
  10.             _root.attachMovie("5coin","5coin" + a,a);
  11.             _root["5coin" + a]._x = _root["coin_t" + d]._x;
  12.             _root["5coin" + a]._y = _root["coin_t" + d]._y;
  13.             bet += 5;
  14.             credit -= 5;
  15.             a++;
  16.          }
  17.          d++;
  18.       }
  19.    }
  20.    else if(credit < _root.coinValue)
  21.    {
  22.       _root.notEnough.play();
  23.    }
  24.    else if(bet eq max)
  25.    {
  26.       _root.maxMoney.play();
  27.    }
  28. }
  29. startDrag("chace",1);
  30. _root.ball_m._visible = 0;
  31. stop();
  32.